
static function greeting(name, out) {
    out.write('Hello ' + name + '!');
}

$ greeting('Frank', out);
$ greeting('John', out);